import request from "@/utils/request";
export const getAreaList = () => {
  return request({
    url: "/dataDict/getAll",
    method: "get",
  });
};
export const add = (data) => {
  return request({
    url: "/policeInfo/add",
    method: "post",
    data,
  });
};
export const upload = (data) => {
  return request({
    url: "/file/upload",
    data,
    transformRequest: (data) => {
      let formData = new FormData();
      formData.append("file", data.file);
      return formData;
    },
  });
};
export const getList = (data) => {
  return request({
    url: "/policeInfo/getByPoliceName",
    data,
  });
};
export const send = (data) => {
  return request({
    url: "/sms/send",
    data,
  });
};
export const checkSmsCode = (data) => {
  return request({
    url: "/sms/checkSmsCode",
    data,
  });
};
export const updateInfo = (data) => {
  return request({
    url: "/policeInfo/updateInfo",
    data,
  });
};
